public class MySx {
    public int x;

    public static void main(String[] args){
        MySx myObj = new MySx();

        int y = 40;
        myObj.x = y;
        System.out.println(myObj.x);
    }
}                                       //输出为40
